import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

boston = pd.read_csv('../Data/boston_house_prices.csv', encoding='gbk')
sns.set_style({'font.sans-serif':['SimHei', 'Arial']})
# plt.rcParams['axe.unicode_minus'] = False
print(boston.head(100))
corr = boston.corr()  # 特征的相关系数矩阵
sns.heatmap(data=corr)
plt.title('特征矩阵热力图')

plt.figure(figsize=(10, 10))
sns.heatmap(corr, annot=True, fmt='.2f')
plt.title('特征矩阵热力图')
plt.show()

plt.show()


